package com.ruibang.glass.material.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 调拨管理
 * </p>
 *
 * @author mameng
 * @since 2024-04-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(description = "调拨管理")
@TableName(value = "g_material_allocation_management")
public class MaterialAllocationManagement extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "调拨编号")
    private String allocationNumber;

    @ApiModelProperty(value = "调出厂房")
    private String leavePlant;

    @ApiModelProperty(value = "调出厂房Id")
    private String leavePlantId;

    @ApiModelProperty(value = "调出仓库")
    private String leaveWarehouse;

    @ApiModelProperty(value = "调出仓库")
    private String leaveWarehouseId;

    @ApiModelProperty(value = "调入厂房")
    private String inPlant;

    @ApiModelProperty(value = "调入厂房")
    private String inPlantId;

    @ApiModelProperty(value = "调入仓库")
    private String inWarehouse;

    @ApiModelProperty(value = "调入仓库")
    private String inWarehouseId;

    @ApiModelProperty(value = "申请人")
    private String applyUser;

    @ApiModelProperty(value = "申请人")
    private String applyUserId;

    @ApiModelProperty(value = "物品名称")
    private String itemName;

    @ApiModelProperty(value = "物品Id")
    private String itemId;

    @ApiModelProperty(value = "物品编码")
    private String itemCode;

    @ApiModelProperty(value = "规格型号")
    private String specification;

    @ApiModelProperty(value = "条形码编号")
    private String barcodeNumber;

    @ApiModelProperty(value = "数量")
    private Integer quantity;

    @ApiModelProperty(value = "单位")
    private String unitPrice;

    @ApiModelProperty(value = "库位")
    private String storageLocation;

    @ApiModelProperty(value = "库位Id")
    private String warehouseId;

    @ApiModelProperty(value = "物料序号")
    private String itemNumber;

    @ApiModelProperty(value = "创建人Id")
    private String createUserId;

    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime finishDate;

    @ApiModelProperty(value = "供应商")
    private String supplier;

    @ApiModelProperty(value = "接收人")
    private String receiveUser;

    @ApiModelProperty(value = "接收人Id")
    private String receiveUserId;

    @ApiModelProperty(value = "接收时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime receiveDate;

    @ApiModelProperty(value = "接收状态")
    private String receiveStatus;

    @ApiModelProperty(value = "状态")
    @TableField(exist = false)
    private String status;

    @ApiModelProperty(value = "流程Id")
    @TableField(exist = false)
    private String processId;

    @ApiModelProperty(value = "审批人")
    @TableField(exist = false)
    private String approveUser;

    @ApiModelProperty(value = "审批人")
    @TableField(exist = false)
    private String approveUserId;

    @ApiModelProperty(value = "审批状态")
    private String approveStatus;

    @ApiModelProperty(value = "审批节点")
    @TableField(exist = false)
    private String nodeName;

    @ApiModelProperty(value = "菜单Id")
    @TableField(exist = false)
    private String menuId;

    @ApiModelProperty(value = "批量删除")
    @TableField(exist = false)
    private List<String> ids;

    @ApiModelProperty(value = "关联物品")
    @TableField(exist = false)
    private List<MaterialAllocationItem> materialAllocationItemList;


}
